<template>
  <ul class="module-content article-list headline-list" id="jrrs">
    <JrrsList
      v-for="(list, index) in lists"
      :key="index"
      :list="list"
      :index="index + 1"
    />
    <!-- <div id="Loading">
      <div class="loader-inner ball-beat">
        <div></div>
        <div></div>
        <div></div>
      </div>
    </div> -->

  </ul>
</template>

<script>
import JrrsList from './views/jrrslist.vue'
import axios from 'axios'
export default {
  data () {
    return {
      lists: []
    }
  },
  components: {
    JrrsList
  },
  created () {
    this.getdata()
  },
  methods: {
    getdata () {
      new Promise((resolve, reject) => {
        axios.get('/posts')
          .then(res => {
            // resolve(res.data)
            console.log(res.data)
            this.lists = res.data.jrrs
          })
          .catch(reject)
      })
    }
  }
}
</script>


<style lang="stylus" scoped>
#jrrs {
  height 195px
}
</style>
